import request from "../utils/request";

export const createUser = (data) => {
    return request({
        url: "/users/",
        method: "post",
        data: data
    })
}

export const getUserInfo = (page) => {
    return request({
        url: "/users/",
        params: page
    })
}

export const deleteUser = (id) => {
    return request({
        url: `/users/${id}`,
        method: "delete",

    })
}

export const updateUser = (data, id) => {
    return request({
        url: `/users/${id}/`,
        method: "put",
        data: data
    })
}

export const exportExcel = (data) => {
    return request({
        url: "/users/export/",
        method: "post",
        data: data,
        responseType: "blob"
    })
}

export const deleteFm = (data) => {
    return request({
        url: "/users/remove/",
        method: "post",
        data: data,

    })
}